home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / domacnost a kancelar / autoit / autoit-v3-setup.exe / Examples / Helpfile / _IEPropertyGet.au3 < prev    next >
Text File  |  2007-09-08  |  2KB  |  43 lines

  1. ; *******************************************************
  2. ; Example 1 - Open a browser with the basic example, check to see if the
  3. ;                addressbar is visible, if it is turn it off, if it is not turn it on
  4. ; *******************************************************
  5. ;
  6. #include <IE.au3>
  7. $oIE = _IE_Example ("basic")
  8. If _IEPropertyGet ($oIE, "addressbar") Then
  9.     MsgBox(0, "AddressBar Status", "AddressBar Visible, turning it off")
  10.     _IEPropertySet ($oIE, "addressbar", False)
  11. Else
  12.     MsgBox(0, "AddressBar Status", "AddressBar Invisible, turning it on")
  13.     _IEPropertySet ($oIE, "addressbar", True)
  14. EndIf
  15.  
  16. ; *******************************************************
  17. ; Example 2 - Open a browser with the form example and get a reference to the form 
  18. ;                textarea element.  Get the coordinates and dimensions of the text area,
  19. ;                outline its shape with the mouse and come to rest in the center
  20. ; *******************************************************
  21. ;
  22. $oIE = _IE_Example("form")
  23.  
  24. $oForm = _IEFormGetObjByName($oIE, "ExampleForm")
  25. $oTextArea = _IEFormElementGetObjByName($oForm, "textareaExample")
  26.  
  27. ; Get coordinates and dimensions of the textarea
  28. $iScreenX = _IEPropertyGet($oTextArea, "screenx")
  29. $iScreenY = _IEPropertyGet($oTextArea, "screeny")
  30. $iBrowserX = _IEPropertyGet($oTextArea, "browserx")
  31. $iBrowserY = _IEPropertyGet($oTextArea, "browserY")
  32. $iWidth = _IEPropertyGet($oTextArea, "width")
  33. $iHeight = _IEPropertyGet($oTextArea, "height")
  34.  
  35. ; Outline the textarea with the mouse, come to rest in the center
  36. MouseMove($iScreenX, $iScreenY)
  37. MouseMove($iScreenX + $iWidth, $iScreenY)
  38. MouseMove($iScreenX + $iWidth, $iScreenY + $iHeight)
  39. MouseMove($iScreenX, $iScreenY + $iHeight)
  40. MouseMove($iScreenX, $iScreenY)
  41. MouseMove($iScreenX + $iWidth/2, $iScreenY + $iHeight/2)
  42.  
  43.